home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / utility / ccache11.zip / EQANDA.TXT < prev    next >
Text File  |  1996-06-22  |  21KB  |  532 lines

  1. EQANDA          COPYRIGHT 1995-1996 horio shoichi          EQANDA
  2.  
  3.  
  4.  
  5. NAME
  6.      eqanda.txt - Expected Questions And Answers
  7.  
  8.  
  9. CONTENTS
  10.      This section contains the questions probably raised in using
  11.      concache.exe and the family programs,  the  DOS  disk  cache
  12.      program,  and  their  answers.  Following is the contents of
  13.      this section.
  14.  
  15.           Why And How Cache Programs Speed Up Disk Io ?
  16.           What Are The Elements To Limit Concurrency ?
  17.           How Much Memory Should Be Prepared For Cache ?
  18.           How Concache.exe Can Be Tuned,  In  Terms  Of   Conven-
  19.           tional Memory ?
  20.           Is  There Anything To Note With Relation To Serial Com-
  21.           munications Software ?
  22.           Troubleshooting
  23.  
  24.  
  25. QUESTION
  26.      Why And How Cache Programs Speed Up Disk Io ?
  27.  
  28. ANSWER
  29.      Actually, disk  cache  programs  don't  speed  up  disk  io.
  30.      Instead, they reduce the number of disk io operations.  They
  31.      work to the user program as if disk io is completed as  soon
  32.      as  possible.   They buffer disk data in a large memory area
  33.      called disk cache buffer (hereafter  simply  termed  cache).
  34.      For  read  requests,  if  the  data to be read reside in the
  35.      cache, data is supplied from cache.  Also, data to  be  read
  36.      next by user programs are read and stored in the cache. This
  37.      method of speed up is called "read ahead" or "preread".  For
  38.      write  requests,  the  data to be written is copied into the
  39.      cache and user programs "think" the data to be written   are
  40.      really  written  to  disks. The data are actually written at
  41.      the cache program's convenience. This method of speeding  up
  42.      the  write requests is called "delay write", "write behind",
  43.      "write after", or "postwrite".
  44.  
  45.      First generation of PC cache programs were generally  reluc-
  46.      tant  to  use postwrite. This is thought of as a too special
  47.      luxury.  Data to be written are written to disks as soon  as
  48.      requested.   The  method to handle writes this way is called
  49.      "write-through".
  50.  
  51.      When cache programs arrived on the market  which  use  post-
  52.      write,  it  is found the programs more than double the speed
  53.      of writes. This is because disk allocation table,  known  as
  54.      FAT,  is  located  at  the top of disk and data space at the
  55.  
  56. Concache 1.10       Last Update:  19 June 1996                  1
  57.  
  58.  
  59.  
  60. EQANDA          COPYRIGHT 1995-1996 horio shoichi          EQANDA
  61.  
  62.  
  63.  
  64.      opposite corner, every write request first writes FAT  mark-
  65.      ing  as  used  and then turns head to the allocated area and
  66.      write data sectors.  Postwrite in effect eliminates repeated
  67.      writes  on  FAT  by submitting to DOS yet unwritten FAT. So,
  68.      not only actual number of write operations are  reduced  but
  69.      most  head  movements are eliminated by not needing to actu-
  70.      ally go back and forth to FAT area.
  71.  
  72.      When working on floppy, you might  have  experienced  severe
  73.      performance  degradation if buffers= statement in config.sys
  74.      file is inadequately written.  Also you might have  observed
  75.      writes  get  slow  down as your program proceed.  What cache
  76.      programs do, up to this generation, is to  extend  the  con-
  77.      fig.sys statement buffers= to a large cache buffer.
  78.  
  79.      Next  come so called "advanced" cache programs which attempt
  80.      to write data back concurrently with  user  programs.  These
  81.      cache  programs  don't wait keyboard idle time, for example,
  82.      to write back cached data.  This means traditional DOS  pro-
  83.      grams'  common  inception  that because disk writes are slow
  84.      they must be held into application program's  buffers  until
  85.      absolute  needs  arise to write them back is wrong.  Writing
  86.      data as required is in fact faster and, perhaps less  impor-
  87.      tant, eliminates the need of huge buffers from each applica-
  88.      tion program.  In addition, because data are written as they
  89.      are  produced,  there  are  less  chances of accidental data
  90.      loss.  They become faster, safer and leaner.
  91.  
  92.      It might be possible to think disk speed up has taken  place
  93.      beginning with this generation.
  94.  
  95.      Concache.exe  belongs  to  this  generation,  and  has added
  96.      another generality. It allows concurrency as far as there is
  97.      no  reason  to  refrain  from. The result is one floppy, one
  98.      BIOS disk, and as many as SCSI disks configurable  into  DOS
  99.      can be driven concurrently with DOS/user programs.
  100.  
  101.  
  102. QUESTION
  103.      What Are The Elements To Limit Concurrency ?
  104.  
  105. ANSWER
  106.      From  hardware  point  of  view, floppies can not perform io
  107.      concurrently each other due  to  floppy  controller  design.
  108.      Also, IDE disks cannot.  SCSI disks can perform io in paral-
  109.      lel, as seen on many multiprogramming operating systems.  At
  110.      this  level,  one  floppy,  one  IDE disk and SCSI disks can
  111.      operate concurrently.
  112.  
  113.  
  114.  
  115. Concache 1.10       Last Update:  19 June 1996                  2
  116.  
  117.  
  118.  
  119. EQANDA          COPYRIGHT 1995-1996 horio shoichi          EQANDA
  120.  
  121.  
  122.  
  123.      The next level to consider is BIOS to support io operations.
  124.      As  far  as published BIOS listing is concerned, there is no
  125.      reason floppy and  IDE  disk  cannot  operate  concurrently.
  126.      SCSI drivers are usually written to do io asynchronously.
  127.  
  128.      Here comes BIOS capability to distinguish disk events. Stan-
  129.      dard BIOS handle only two "type"s of disks, which is  suffi-
  130.      cient  for  floppies  and IDE disk environments, as found in
  131.      most PC configurations.  Fortunately,  ASPI  (advanced  SCSI
  132.      programming  interface) specification, now broadly employed,
  133.      supports a mechanism effectively similar to BIOS disk  event
  134.      notification,  called command posting. (See appropriate man-
  135.      ual about  this.)   This  allows  handle  individual  disk's
  136.      events.
  137.  
  138.      At  this  level  no  situations  about  concurrency issue is
  139.      changed.
  140.  
  141.      The next  level  of  the  factor  is  device  driver's  non-
  142.      reentrancy.  Even  if a device driver manages several disks,
  143.      it expects its requests come serially but not while the pre-
  144.      vious  requests are in  progress. In fact, most known device
  145.      drivers lose reentrancy necessary  for  concurrency  at  the
  146.      very first two steps of driver code execution.
  147.  
  148.      Also,  io.sys  handles  int13,  which  is  passed through by
  149.      almost any disk device call, in non-reentrant way.  So,  you
  150.      may  think if third party device driver is used, for example
  151.      using io.sys for  floppies  and  that  for  the  other  disk
  152.      devices, then at least the combination of one floppy and one
  153.      hard disk should work concurrently.  But no. If  both  share
  154.      int13, then they don't work concurrently.
  155.  
  156.      Next  comes the DOS drive letter availability. If, for exam-
  157.      ple, a SCSI disk is split into  two  partitions,  with  many
  158.      good  reasons, the user loses one drive letter for one disk.
  159.      These two partitions cannot share the io operation time.
  160.  
  161.      Those constitute inherent limitations  of  concurrency.   In
  162.      practice,  there are resource limitations for programs under
  163.      DOS.  For example ASPI drivers may limit the number of pack-
  164.      ets that it can accept at once.
  165.  
  166.      Likewise, ccdisk.exe can limit the concurrency of SCSI disks
  167.      from its command line.
  168.  
  169.      Finally, concache.exe can limit concurrency in two ways.
  170.  
  171.      1)   concurrency= option limits  the  number  of  concurrent
  172.           devices.
  173.  
  174. Concache 1.10       Last Update:  19 June 1996                  3
  175.  
  176.  
  177.  
  178. EQANDA          COPYRIGHT 1995-1996 horio shoichi          EQANDA
  179.  
  180.  
  181.  
  182.      2)   io_buffers= option specifies insufficient io buffers to
  183.           let devices work concurrently.
  184.  
  185.  
  186. QUESTION
  187.      How Much Memory Should Be Prepared For Cache ?
  188.  
  189. ANSWER
  190.      There are certainly optimal points of cache  size.  Unfortu-
  191.      nately,  the points are too dependent on application and the
  192.      mix.  There is no clear way to estimate